//
//  MLinfoViewController.m
//  Molian
//
//  Created by 胡津 on 15/4/13.
//  Copyright (c) 2015年 xiaocan. All rights reserved.
//

#import "MLinfoViewController.h"
#import "WEBViewController.h"

@interface MLinfoViewController ()

@end

@implementation MLinfoViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"关于我们";
    self.view.backgroundColor = APPCOLORBACKGROUNDCOLOR(1);

    //专属恋人app logo
    UIImageView *Logo = [[UIImageView alloc]initWithFrame:CGRectMake((DeviceWidth-100)/2, 200, 100, 100)];
    Logo.image = [UIImage imageNamed:@"common_koudai_icon"];
    Logo.layer.masksToBounds = YES;//开启圆角
    [Logo.layer setCornerRadius:20];
    [self.view addSubview:Logo];
    
    //版本号
    UILabel *version = [[UILabel alloc]initWithFrame:CGRectMake(0, 310, DeviceWidth, 20)];
    NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary];
    version.textAlignment = NSTextAlignmentCenter;
    version.textColor = RGBA(160, 160, 165, 1);
    version.font = [UIFont fontWithName:FontName size:13];//改字体和大小
    version.text = [NSString stringWithFormat:@"无独团  %@",[infoDict objectForKey:@"CFBundleShortVersionString"]];
    [self.view addSubview:version];
    


    //用户许可协议
    UIButton *agreement = [UIButton buttonWithType:UIButtonTypeCustom];
    agreement.frame = CGRectMake(0, DeviceHeight-60, DeviceWidth, 20);
    agreement.titleLabel.textAlignment = NSTextAlignmentCenter;
    [agreement setTitle:@"《用户许可协议》" forState:UIControlStateNormal];
    [agreement addTarget:self action:@selector(AgreementAcition) forControlEvents:UIControlEventTouchUpInside];
    [agreement setTitleColor:RGBA(111, 186, 244, 1) forState:UIControlStateNormal];
    agreement.titleLabel.font = [UIFont fontWithName:FontName size:11];
    [self.view addSubview:agreement];
    
    //小蚕科技

    UILabel * Copyright = [[UILabel alloc]initWithFrame:CGRectMake(20, DeviceHeight-30, DeviceWidth-40, 20)];
    Copyright.text = @"Copyright © 2015, XiaoCan Co., Ltd. All Rights Reserved. 小蚕科技";
    Copyright.adjustsFontSizeToFitWidth = YES;
    Copyright.textAlignment = NSTextAlignmentCenter;
    Copyright.textColor = RGBA(102, 102, 102, 1);
    Copyright.font = [UIFont fontWithName:FontName size:11];
    [self.view addSubview:Copyright];
    
}

//用户协议链接
-(void)AgreementAcition
{
    WEBViewController *web = [[WEBViewController alloc]init];
    web.WEBURL = @"http://www.wudutuan.com/protocol/";
    [self.navigationController pushViewController:web animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    if ([self isViewLoaded]&&!self.view.window) {
        self.view = nil;
    }
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
